<template>
	<view class="follow">
		<!-- 封装一个全局的公共下拉框picker -->
		<picker ref="picker" v-show="pickerShow" @change="pickerChange" :value="pickerIndex" :range="pickerArray"></picker>
		<view class="selectMember">
			<view class="member"  @click="id ? dialog = false : dialog = true">
				<image src="../../../static/img/quickly/information/add@2x.png"></image>
				<text>{{userName || '选择会员'}}</text>
			</view>
			<view class="save" @click="seveAdd(1)">保存</view>
			<view class="toSend" @click="seveAdd(2)">签名发送</view>
		</view>
		<view class="followUpDate">
			<view class="bj"></view>
			<view class="fixed">
				<view class="data">
					<text>随访日期：</text>
					<view class="uni-list">
						<view class="uni-list-cell">
							<view class="uni-list-cell-db">
								 <picker mode="date" :start="start" :end="other"  @change="bindDateChange">
								     <view class="date">{{start_date}}</view>
								 </picker>
							</view>
						</view>
					</view>
				</view>
				<view class="way" @click="showModel('followUpMethod')">
					<text>随访方式：</text>
					<span>{{data.followUpMethod}}</span>
				</view>
			</view>
		</view>
		
		<!-- 症状 -->
		<view class="mainContent">
			<view class="symptom">
				<view class="symptomTitle">
					<image src="../../../static/img/quickly/follow/followBg.png" mode=""></image>
					<text>症状</text>
				</view>
				<view class="symptomType">					
					<view class="symptomContent" v-for="(item,index) in symptomList" :key="index">
						<view class="symptomsDescribed">
							<label>{{index+1+'. '}}</label>
							<input type="text" placeholder="请输入症状" v-model="item.value"/>
							<image src="../../../static/img/quickly/follow/closeFollow.png" mode="widthFix" @click="delSymptomType(index)"></image>
						</view>
					</view>
					
					<view class="addSymtom" @click="addsymptomType">
						<image src="../../../static/img/quickly/follow/addFollow.png"></image>添加症状
					</view>
				</view>
			</view>
		</view>
		
		<!-- 体征 -->
		<view class="mainContent">
			<view class="sign">
				<view class="signTitle">
					<image src="../../../static/img/quickly/follow/followBg.png" mode=""></image>
					<text>体征</text>
				</view>
				<view class="sign-content">
					<view class="default-sign">
						<view class="item"><span>体重（kg）</span><em>:</em><input type="text" placeholder="数值" v-model="data.physicalSign[0].value"/></view>
						<view class="item"><span>BMI</span><em>:</em><input type="text" placeholder="数值" v-model="data.physicalSign[1].value"/></view>
						<view class="item"><span>血压（mmHg）</span><em>:</em>
							<view>
								<input type="text" v-model="data.physicalSign[2].value1"  placeholder="数值" />
								<text>|</text>
								<input type="text" class="xy" v-model="data.physicalSign[2].value2" placeholder="数值"/>
							</view>
						</view>
						<view class="item"><span>血糖（mmol/L）</span><em>:</em><input type="text" v-model="data.physicalSign[3].value" placeholder="数值"/></view>
					</view>
					<view class="sign-add">
						<view  v-if="data.physicalSign.length > 4">
							<view class="signlist" v-for="(item,index) in data.physicalSign" :key="index">
								<view v-if="index > 3">
									<view class="item">
										<input type="text" placeholder="项目" v-model="data.physicalSign[index].name" /> <em>:</em>
										<input type="text" placeholder="数值" v-model="data.physicalSign[index].value"/>
										<image src="../../../static/img/quickly/follow/closeFollow.png" mode="widthFix" @click="delPhysicalSign(index)"></image>
									</view>
								</view>
							</view>
						</view>
						<view class="addsign" @click="addsign">
							<image src="../../../static/img/quickly/follow/addFollow.png"></image>添加体征
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 生活指导 -->
		<view class="mainContent">
			<view class="life">
				<view class="lifeTitle">
					<image src="../../../static/img/quickly/follow/followBg.png" mode=""></image>
					<text>生活方式情况</text>
				</view>
				<view class="life-content">
					<view class="default-life">
						<view class="item"  @click="showModel('smoke')">
							<span>吸&emsp;&emsp;烟：</span>
							<span>{{data.smoke}}{{data.smoke == '不吸烟'?'':'支/天'}}</span>
						</view>
						<view class="item" @click="showModel('drink')"><span>喝&emsp;&emsp;酒：</span><span>{{data.drink}}{{data.drink == '不喝酒'?'':'两/天'}}</span></view>
						<view class="item"><span>运&emsp;&emsp;动：</span>
							<view class="motion">
								<view  @click="showModel('motion')">{{data.motion}}{{data.motion == '不运动'?'':'次/周'}}</view>
								<text v-if="data.motion != '不运动'">|</text>
								<view class="minute" @click="showModel('duration')" v-if="data.motion != '不运动'">{{data.duration}}分钟/次</view>
							</view>
						</view>
						<view class="item" @click="showModel('saltIntake')"><span>摄盐情况：</span>{{data.saltIntake}}</view>
						<view class="item" @click="showModel('psychology')"><span>心理调整：</span>{{data.psychology}}</view>
						<view class="item" @click="showModel('follow')"><span>遵从行为：</span>{{data.follow}}</view>
						<view class="item"><span>其&emsp;&emsp;他：</span>
							<!-- <textarea placeholder="内容" v-model="data.default_other"  auto-height="true" maxlength="10000"></textarea> -->
							<editor id="otherEditor" class="uni-input commentInput ql-container"  @input="editorInput"></editor>
						</view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 更多事项 -->
		<view class="mainContent">
			<view class="more">
				<view class="moreTitle">
					<image src="../../../static/img/quickly/follow/followBg.png" mode=""></image>
					<text>更多事项</text>
				</view>
				<view class="more-content">
					<view class="moreContent" v-for="(item,index) in moreList" :key="index">
						<template >
							<view class="item">
								<label>{{index+1+'. '}}</label>
								<input type="text" v-model="item.value" placeholder="请输入事项" />
								<image src="../../../static/img/quickly/follow/closeFollow.png" mode="widthFix" @click="delMoreList(index)"></image>
							</view>
						</template>
					</view>
						
					<view class="addmore" @click="addmore">
						<image src="../../../static/img/quickly/follow/addFollow.png"></image>添加事项
					</view>
				</view>
			</view>
		</view>
		
		<!-- 服务情况 -->
		<view class="mainContent">
			<view class="server">
				<view class="serverTitle">
					<image src="../../../static/img/quickly/follow/followBg.png" mode=""></image>
					<text>服务情况</text>
				</view>
				<view class="server-content">
					<view class="default-server">
						<view class="item">
							<span>下次随访日期：</span>
							<picker mode="date" :start="nextDate_start_date" @change="bindDateChange2">
								<view class="date">{{nextDate}}</view>
							</picker>
						</view>
						<view class="item"><span>本次随访人员：</span><i>{{healthInformation.realName}}</i></view>
						<view class="item"><span>本次随访会员：</span><i>{{userName}}</i></view>
						<view class="item" v-if="status != 0"><span>此次随访评价：</span><i>{{evaluate}}</i></view>
					</view>
				</view>
			</view>
		</view>
		
		<!-- 会员弹框 -->
		<member :dialog.sync="dialog"  @hidedialog="hidedialog" @chooseUser="chooseUser"></member>
	</view>
</template>
<script src="@/static/js/quickly/follow/createFollow.js"></script>

<style lang="scss" scoped>
	@import '@/static/iconfont/iconfont.css';
	@import '@/static/css/quickly/follow/createFollow.scss';
</style>
